export default function format(val: string, ...args: any[]) {
    return val.replace(/{(\d+)}/g, function (match: string, index: number) {
        return typeof args[index] != 'undefined' ? args[index] : match;
    });
}